package com.emperor.controller.vmservice;

import com.emperor.result.Result;
import com.emperor.service.EquipmentService;
import com.emperor.vo.SkuClassPageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/vm-service/vm")
@Api(tags = "设备详情")
public class EquipmentController {
    @Autowired
    private EquipmentService equipmentService;

    @ApiOperation("设备详情界面")
    @GetMapping("/search")
    public SkuClassPageVo findAll(Integer pageIndex, Integer pageSize, String name) {
        SkuClassPageVo all = equipmentService.findAll(pageIndex, pageSize, name);
        return all;
    }

    @PostMapping("/add")
    @ApiOperation("新增设备")
    public Result addVm() {
        return Result.success();
    }
}
